<!DOCTYPE html>
<html lang="en">
	<!--
        	作者：lijj
        	时间：2016-03-16
        	描述：查看随堂测试
-->
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
		<title>随堂测试</title>
		<link rel="stylesheet" href="__PUBLIC__/css/weui.min.css" />
		<link rel="stylesheet" /href="__PUBLIC__/css/example.css" />
		<script src="__PUBLIC__/js/zepto.min.js"></script>
		<script src="__PUBLIC__/js/jquery-weui.js"></script>
		<script src="__PUBLIC__/js/jquery.min.js"></script>
		<style type="text/css">
			.container {
				overflow: visible;
			}
			
			.hd {
				padding: 1em;
			}
			
			.weui_cells_title {
				padding-left: 15px;
			}
			.showchoice{
				position: relative;
    			line-height: 42px;
    			font-size: 17px;
    			border-top: 1px solid #d5d5d6;
    			margin: 0;
    			padding: 0;
			}
		</style>

	</head>

	<body>

		<!--查看班级start-->
		<div class="container">
			<div class="hd">
				<h1 class="page_title">随堂测试</h1>
				<div class="addclass">
					<a href="javascipt:;" class="weui_btn weui_btn_mini weui_btn_primary" id="addtestquestion">发布随堂测试</a>
				</div>
			</div>
			<div class="bd">
				<foreach name="classInfo" item="classInfo">
					<div class="classinfo" id="answercasechoose">
						<div class="group">
							<div class="classinfo group classes">{$classInfo.quizName}测试</div>
							<div class="classinfo group college">共0题目</div>
						</div>
						<br/>
						<label class="classinfo studentes">共提交<span>0</span>人</label>
						<div class="happen">
							<label class="classinfo happen time" style="margin: 0; padding: 0;">开启:0/6</label>
							<label class="classinfo happen time" style="margin: 0; padding: 0;">收藏:0</label>
						</div>
					</div>
				</foreach>
			</div>
			<div id="actionSheet_wrap">
				<div class="weui_mask_transition" id="mask"></div>
				<div class="weui_actionsheet" id="weui_actionsheet">
					<div class="weui_actionsheet_menu">
						<div class="weui_actionsheet_cell" id="choice_make">选择出题</div>
						<div class="weui_actionsheet_cell" id="random_make">随机出题</div>
					</div>
					<div class="weui_actionsheet_action">
						<div class="weui_actionsheet_cell" id="actionsheet_cancel">取消</div>
					</div>
				</div>
			</div>
			<div class="weui_dialog_confirm" id="answercase" style="display:none;">
				<div class="weui_mask" id="showcasemask"></div>
				<div class="weui_dialog">
					<div class="showchoice" id="setteststate">
						设置试题状态
					</div>
					<div class="showchoice" id="showanswercase">
						查看答题情况
					</div>

				</div>
	</body>
	<script type="text/javascript">
		$("#addtestquestion").click(function(e) {
			var mask = $('#mask');
			var weuiActionsheet = $('#weui_actionsheet');
			weuiActionsheet.addClass('weui_actionsheet_toggle');
			mask.show().addClass('weui_fade_toggle').one('click', function() {
				hideActionSheet(weuiActionsheet, mask);
			});
			$('#actionsheet_cancel').one('click', function() {
				hideActionSheet(weuiActionsheet, mask);
			});
			weuiActionsheet.unbind('transitionend').unbind('webkitTransitionEnd');

			function hideActionSheet(weuiActionsheet, mask) {
				weuiActionsheet.removeClass('weui_actionsheet_toggle');
				mask.removeClass('weui_fade_toggle');
				weuiActionsheet.on('transitionend', function() {
					mask.hide();
				}).on('webkitTransitionEnd', function() {
					mask.hide();
				})
			};
			//选择出题
			$("#choice_make").one('click', function() {
				hideActionSheet(weuiActionsheet, mask);
				window.location.href="choiceMake";
			});
			$("#random_make").one('click', function() {
				hideActionSheet(weuiActionsheet, mask);
				alert('随机出题功能还未做出，请选择选择选择出题');
			});
		});
		$(".classinfo .group .classes").click(function(e) {
			var mask = $('#showcasemask');
			$("#answercase").toggle();
			mask.click(function() {
				$("#answercase").hide();
			});
			$("#showanswercase").click(function() {
				window.location.href = "showAnserCase";
			});
			$("#setteststate").click(function() {
				window.location.href = "setTestState";
			});
		});
	</script>

</html>